home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / sys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-17  |  2.8 KB  |  115 lines

  1. /*
  2.  * sys.h --
  3.  *
  4.  *     User-level definitions of routines and types for the sys module.
  5.  *
  6.  * Copyright 1986, 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /user5/kupfer/spriteserver/include/user/RCS/sys.h,v 1.5 92/07/16 17:25:24 kupfer Exp $ SPRITE (Berkeley)
  16.  *
  17.  */
  18.  
  19. #ifndef _SYSUSER
  20. #define _SYSUSER
  21.  
  22. #ifndef _SPRITE
  23. #include <sprite.h>
  24. #endif
  25. #include <cfuncproto.h>
  26.  
  27. typedef enum {
  28.     SYS_WARNING,
  29.     SYS_FATAL
  30. } Sys_PanicLevel;
  31.  
  32. /*
  33.  * Flags for Sys_Shutdown.
  34.  *
  35.  *    SYS_REBOOT         Reboot the system. 
  36.  *    SYS_HALT           Halt the system.
  37.  *    SYS_KILL_PROCESSES Kill all processes.
  38.  *    SYS_DEBUG         Enter the debugger.
  39.  *    SYS_WRITE_BACK     Write back the cache after killing all processes but
  40.  *             obviously before halting or rebooting.
  41.  */
  42.  
  43. #define SYS_REBOOT              0x01
  44. #define SYS_HALT                0x02
  45. #define    SYS_KILL_PROCESSES    0x04
  46. #define    SYS_DEBUG        0x08
  47. #define    SYS_WRITE_BACK        0x10
  48.  
  49. /*
  50.  * Structure that is filled in by Sys_GetMachineInfo.
  51.  */
  52.  
  53.  
  54. /*
  55.  * Machine architecture and type values from Sys_GetMachineInfo().
  56.  */
  57.  
  58. typedef struct {
  59.     int architecture;        /* machine architecture */
  60.     int type;            /* machine type */
  61.     int    processors;        /* number of processors */
  62. } Sys_MachineInfo;
  63.  
  64. #define SYS_SPUR        1
  65. #define SYS_SUN2        2
  66. #define SYS_SUN3        3
  67. #define SYS_SUN4        4
  68. #define SYS_MICROVAX_2        5
  69. #define SYS_DS3100        6   /* DecStation 3100 */
  70. #define SYS_SYM                 7   /* Sequent symmetry */
  71. #define SYS_DS5000              8   /* DecStation 5000 */
  72.  
  73. #define SYS_SUN_ARCH_MASK    0xf0
  74. #define    SYS_SUN_IMPL_MASK    0x0f
  75.  
  76. #define    SYS_SUN_2        0x00
  77. #define    SYS_SUN_3        0x10
  78. #define    SYS_SUN_4        0x20
  79. #define    SYS_SUN_4_C        0x50
  80.  
  81. #define SYS_SUN_2_50        0x02
  82. #define SYS_SUN_2_120        0x01
  83. #define SYS_SUN_2_160        0x02
  84. #define SYS_SUN_3_75        0x11
  85. #define SYS_SUN_3_160        0x11
  86. #define SYS_SUN_3_50        0x12
  87. #define    SYS_SUN_3_60        0x17
  88. #define    SYS_SUN_4_200        0x21
  89. #define    SYS_SUN_4_C_60        0x51
  90. #define    SYS_SUN_4_C_65        0x53
  91.  
  92. /* 
  93.  * Type definition for the Sprite MIG stub.
  94.  */
  95.  
  96. typedef char *Sys_CharArray;    /* arbitrary character array */
  97.  
  98. /* 
  99.  * Function declarations:
  100.  */
  101.  
  102. extern char *        Sys_CallName _ARGS_((int callNumber));
  103.  
  104. /* 
  105.  * These are user declarations and they potentially conflict with names in 
  106.  * the server, so don't declare them when building the server.
  107.  */
  108. #ifndef SPRITED
  109. extern ReturnStatus    Sys_GetMachineInfo _ARGS_((int size,
  110.                            Address bufferPtr));
  111. extern ReturnStatus    Sys_Shutdown _ARGS_((int flags, char *rebootString));
  112. #endif
  113.  
  114. #endif /* _SYSUSER */
  115.